<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>

<script type="text/javascript">
    function deleteDocumento() {
        if (confirm("Desea eliminar este documento")) {
            return true;
        }
        return false;
    }
</script>
<div class="container">
    <table class="table table-striped">
        <tr>
            <th>Nombre</th>
           <th style="width: 150px;"></th>
            <th style="width: 150px;"></th>
        </tr>
        <c:forEach var="documento" items="${resultado}">
            <tr>
                <td>${documento.nombre}</td>
                  <td><a href="<c:url value='/pages/documentos/edit?id=${documento.id}'/>">Editar documento</a></td>
                <td><a href="<c:url value='/pages/documentos/delete?id=${documento.id}'/>" onclick="if (deleteDocumento()) { return true; } else { return false; }">Eliminar documento</a></td>
            </tr>
        </c:forEach>
    </table>
</div>
